Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As _
             System.EventArgs) Handles btnAdd.Click
  Static Count As Integer = 0

  If txtName.Text <> "" And txtPhone.Text <> "" Then
    Count += 1
    ReDim Preserve MyList(Count)  ' przydzia miejsca w pamici dla   
                                  ' tablicy
    MyList(Count - 1).Name = txtName.Text
    MyList(Count - 1).Phone = txtPhone.Text
    txtName.Text = ""   ' Czyszczenie na potrzeby kolejnego wpisu
    txtPhone.Text = ""
    txtName.Focus()     ' uaktywnienie pierwszego pola edycji
  Else
    Beep()
    MessageBox.Show("Prosz wprowadzi nazwisko oraz numer telefonu!")
  End If
End Sub
